<?php $this->_extends('_layouts/main_layout'); ?>

<?php $this->_block('title'); ?>
More Spin - LaLaLoot
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="LaLaLoot: support our advertisers and sign-up for offers to play our games for free!" />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
<div class="mt">
	<?php $this->_element('social'); ?>
</div>
<div class="mm getmorecredits">
	<div class="topad">
		<?php echo str_replace('[[USER_ID]]', $user['id'], $site['ad_top']);?>
	</div>
	<div class="clear" style="height: 10px"></div>
	<div class="left white" style="width: 600px;">
		<div class="title">Get More Spins</div>
		<div class="tips1">Participate in our
			sponsors' offers below to receive more spins and to increase our cash jackpot.</div>
		<div class="clear" style="height: 10px"></div>
		<div class="left how">
			<div class="title">HOW IT WORKS:</div>
			<ol class="list">
				<li>Your spins come available when the offer reports back to
					lalaloot.co.uk.</li>
				<li>Most offers report back in 15 minutes, some take longer.</li>
				<li>You can check the status of the offers you've taken anytime by
					clicking on the "Missing Spins?" button.</li>
				<li>Use your spins to keep winning and spinning!</li>
			</ol>
		</div>
		<?php if(isset($user) && empty($user['address1'])): ?>
		<div class="right clicktocomplete">
			<a href="<?php echo url('user/profile'); ?>">
				<img src="<?php echo $img_url; ?>clicktocomplete10.png" alt=""
					width="170" height="175" />
			</a>
		</div>
		<?php endif; ?>
		<div class="clear"></div>
		<div id="tabs">
			<div class="tab" style="width:750px;" id="monetizations">
				<?php 
					if(!empty($monetizations)): 
				?>
					<div class="item on" id="monetization1Tab"><?php echo $monetizations[0]['name']?></div>
					<?php 
						$monetizationsLen = count($monetizations);
						if($monetizationsLen > 1):
							for($i=1; $i<$monetizationsLen; $i++):
					?>
						<div class="item off" id="monetization<?php echo $i+1;?>Tab"><?php echo $monetizations[$i]['name'];?></div>
						<?php endfor; ?>
						<div class="item off" style="position:relative;">
							<?php if(isset($_COOKIE['reftip']) && $_COOKIE['reftip'] == 'new' || !isset($_COOKIE['reftip'])): ?>
								<?php if(!empty($tips['refer-tip'])): ?>
								<div id="refer-tip" style="width:<?php echo $tips['refer-tip']['tip_width']; ?>; position:absolute; left:-115px; top:-60px; border:solid 2px #FFF; background-color:<?php echo $tips['refer-tip']['bg_color']; ?>">
									<div style="color:#FFF; position:absolute; left:170px; top:34px; font-size:16px;">◆</div>
		    						<div style="color:<?php echo $tips['refer-tip']['bg_color']; ?>; position:absolute; left:170px; top:32px; font-size:16px;">◆</div>
		    						<p style="margin:<?php echo $tips['refer-tip']['tip_padding']; ?>; font-size:<?php echo $tips['refer-tip']['font_size']; ?>; color:<?php echo $tips['refer-tip']['font_color']; ?>; font-weight:bolder; line-height:<?php echo $tips['refer-tip']['tip_lineheight']; ?>; height:<?php echo $tips['refer-tip']['tip_height']; ?>"><?php echo $tips['refer-tip']['tip_text']; ?></p>
								</div>
								<?php endif; ?>
							<?php endif; ?>
							<a href="<?php echo url('user/step1'); ?>" target="_blank">Refer a Friend</a>
						</div>
						<script type="text/javascript">
		//					$('#ref').click(function(){
		//						window.open('<?php echo url('user/step1'); ?>', '', 'height=700,width=810,top=50,left=400,toolbar=no,menubar=no,scrollbars=yes');
		//					});
						</script>
					<?php endif; ?>
				<?php endif; ?>
				<div class="clear"></div>
			</div>
			<div class="frame1">
				<div class="t1"></div>
				<div class="m">
					<div class="body left">
						<?php 
							if(!empty($monetizations)): 
								for($i=0; $i<$monetizationsLen; $i++): 
						?>
							<?php if($i == 0): ?>
							<div id="monetization<?php echo $i+1; ?>"><?php 
							echo str_replace(
							array('[[SPONSORPAY_AGE]]', '[[SPONSORPAY_GENDER]]', '[[TRIALPAY_USER_ID]]', '[[USER_ID]]', '[[MONETIZATION_ID]]', '[[PEANUTLABS_USER_ID]]', '[[PEANUTLABS_DOB]]', '[[PEANUTLABS_SEX]]'),
							array((empty($user['birthday'])?'':'&year='.substr($user['birthday'],0,4)), (empty($user['gender'])?'':'&gender='.strtolower($user['gender'])), 'uid'.$user['id'], $user['id'], $monetizations[$i]['id'], $user['id'].'-'.$monetizations[$i]['app_id'].'-'.substr(md5($user['id'].$monetizations[$i]['app_id'].$monetizations[$i]['secret_key']), 0, 10 ), empty($user['birthday'])? '': '&dob='.substr($user['birthday'], -5).'-'.substr($user['birthday'], 0, 4), empty($user['gender'])? '' : ('&sex='.($user['gender']=='F'?2:1))), 
							$monetizations[$i]['html']); ?></div>
							<?php else: ?>
							<div id="monetization<?php echo $i+1; ?>" class="hidden"><?php echo str_replace(array('[[SPONSORPAY_AGE]]', '[[SPONSORPAY_GENDER]]', '[[TRIALPAY_USER_ID]]', '[[USER_ID]]', '[[MONETIZATION_ID]]', '[[PEANUTLABS_USER_ID]]', '[[PEANUTLABS_DOB]]', '[[PEANUTLABS_SEX]]'), array((empty($user['birthday'])?'':'&year='.substr($user['birthday'],0,4)), (empty($user['gender'])?'':'&gender='.strtolower($user['gender'])), 'uid'.$user['id'], $user['id'], $monetizations[$i]['id'], $user['id'].'-'.$monetizations[$i]['app_id'].'-'.substr(md5($user['id'].$monetizations[$i]['app_id'].$monetizations[$i]['secret_key']), 0, 10 ), empty($user['birthday'])? '': '&dob='.substr($user['birthday'], -5).'-'.substr($user['birthday'], 0, 4), empty($user['gender'])? '' : ('&sex='.($user['gender']=='F'?2:1))), $monetizations[$i]['html']); ?></div>
							<?php endif;?>
						<?php 
								endfor; ?>
<!--							<div id="monetization<?php echo $i+1; ?>" class="hidden">-->
<!--								<iframe width=725 height=700 scrolling=auto frameborder=0 src='<?php echo url('user/step1'); ?>'></iframe>-->
<!--							</div>-->
						<?php endif; ?>					
					</div>
					<div class="clear"></div>
				</div>
				<div class="b1"></div>
			</div>
		</div>
	</div>
	<div class="right rightad">
	</div>
	<div class="clear" style="height: 20px;"></div>
	<div class="bottomad">
		<?php echo $site['ad_bottom']; ?>
	</div>
</div>
<div class="mb"></div>
<?php $this->_endblock(); ?>